package com.yuedong.downs;

import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;

import com.yuedong.down.DownLoadManager;


public class MainActivity extends AppCompatActivity {
    private Button btUpdate;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
        btUpdate = (Button) findViewById(R.id.btUpdate);

        btUpdate.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                DownLoadManager.getInstance(R.mipmap.aa).defaultDownLoad(MainActivity.this, "更新1", 0, "https:\\/\\/mccmcc.oss-cn-beijing.aliyuncs.com\\/MCC_V1.0.5.apk");

            }
        });
    }

    @Override
    protected void onDestroy() {
        super.onDestroy();
        DownLoadManager.getInstance().unBindService(this);
    }
}
